#!/bin/bash
#NOTE:  ftp login puts us into html directory, ssh does not.
#set -n
tmpa=/tmp/tmpa$$
tmpb=/tmp/tmpb$$
echo "

ls -1
quit
no" > $tmpb
ncftp -u irvbwiser -p $GODADDYPASS $GODADDYIP < $tmpb > $tmpa
sort $tmpa | sed -e 's/^ *//g' > /tmp/whyaf1
set -x
cd ~/src/afriwarestore
pwd
ls -1d * | sed -e 's/^ *//g' | sort > /tmp/whyaf2
echo "type binary" > /tmp/whyaf3
join -v 2 -j 1 /tmp/whyaf1 /tmp/whyaf2 | sed -e 's/^/put /g' >> /tmp/whyaf3
echo "quit
no" >> /tmp/whyaf3
ncftp -u irvbwiser -p $GODADDYPASS $GODADDYIP < /tmp/whyaf3 | tail -n 10
